Skip to content

feat: Introduce writing-plans plugin and CodeRabbit CLI for plan quality (#3292)#3293

Merged
KATO-Hiro merged 5 commits into
stagingfrom
#3292
Mar 20, 2026
Merged

feat: Introduce writing-plans plugin and CodeRabbit CLI for plan quality (#3292)#3293
KATO-Hiro merged 5 commits into
stagingfrom
#3292

Conversation

@KATO-Hiro
Copy link
Copy Markdown
Collaborator

@KATO-Hiro KATO-Hiro commented Mar 20, 2026

close #3292

Summary by CodeRabbit

  • Documentation

    • Restructured the coding style guide with a new planning-phase checklist, naming conventions, and clearer layer-specific rules.
    • Added contributor docs for AI-assisted planning and phased review workflows; new dev notes on improving plan quality and measurements.
    • Expanded guides on using plan-generation and review tooling.
  • Chores

    • Added configuration for automated, severity-triaged code reviews and updated devcontainer to install review tooling.

KATO-Hiro and others added 4 commits March 20, 2026 06:19
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add superpowers plugin (.claude/settings.json) for /writing-plans skill
- Add .coderabbit.yaml with path_instructions for all project layers
- Update devcontainer.json: install CodeRabbit CLI in postCreateCommand
- AGENTS.md: revamp Step 1 with /writing-plans, task granularity, and plan checklist
- coding-style.md: add Pre-Implementation Layer Check table and naming timing rule
- refactor-plan/instructions.md: add single-responsibility and granularity checks
- claude-code.md: add /writing-plans skill, review chain, and milestone template
- CONTRIBUTING.md: add AI tools section (Claude Code + CodeRabbit)
- Update plan.md: mark all phases complete, add design notes and lessons learned

Closes #3292

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Reorganize coding-style.md into grouped sections (Plan Time, Code
  Structure, Documentation, SvelteKit Patterns, Security, Svelte
  Patterns, Code Review) for better navigability
- Clarify single-responsibility task rule: logical change scope rather
  than strict single-layer constraint
- Make CodeRabbit CLI install non-fatal in devcontainer postCreateCommand
- Expand Phase milestone definition and add setup instructions in
  claude-code.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 20, 2026

Warning

Ignoring CodeRabbit configuration file changes. For security, only the configuration from the base branch is applied for open source repositories.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 795acc7f-8aac-4737-a87d-edcea3c4575c

📥 Commits

Reviewing files that changed from the base of the PR and between 52a6227 and 14e8e9f.

📒 Files selected for processing (2)
  • .claude/rules/coding-style.md
  • .coderabbit.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • .claude/rules/coding-style.md
  • .coderabbit.yaml

Walkthrough

Adds AI-assisted planning and review tooling plus rule updates: superpowers /writing-plans integration, CodeRabbit CLI/CI review configuration, a reorganized coding-style guide with a Plan Time pre-check table, devcontainer tweaks, and documentation for phased plan + milestone review workflow.

Changes

Cohort / File(s) Summary
Tooling & Config
\.claude/settings.json, \.coderabbit.yaml, \.devcontainer/devcontainer.json
Enable superpowers plugin and marketplace entry, add CodeRabbit review configuration (Japanese locale, path filters, per-path rules), and install CodeRabbit CLI in devcontainer post-create script (tolerate failure).
Coding Rules & Plan Checks
\.claude/rules/coding-style.md, \.claude/skills/refactor-plan/instructions.md
Reorganized style guide with new "Plan Time" section and Pre-Implementation Layer Check table, new naming conventions, relocated rule groupings (Documentation, SvelteKit Patterns, Security, etc.), and added task design principles requiring single-responsibility tasks and combined implement+test+commit.
Workflow & Docs
AGENTS.md, CONTRIBUTING.md, docs/guides/claude-code.md, docs/dev-notes/2026-03-20/plan-quality-improvement/plan.md
Introduce /writing-plans for 2–5 minute phased TODO generation, document AI-assisted tools (Claude Code, superpowers), add CodeRabbit milestone review guidance (coderabbit review --plain) and severity triage, and add a plan-quality initiative doc with metrics and operational notes.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant SP as superpowers (/writing-plans)
    participant CLI as CodeRabbit CLI
    participant Repo as Repository
    participant CI as CI

    Dev->>SP: Request phased plan (/writing-plans)
    SP-->>Dev: Returns 2-5min phased TODOs (milestones)
    Dev->>Repo: Commit changes per phase
    Dev->>CLI: Run `coderabbit review --plain` at phase boundary
    CLI-->>Dev: Outputs severity triage (critical/high)
    Repo->>CI: Push PR triggers CI CodeRabbit review
    CI-->>Repo: CI review results (final gate)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

Poem

🐇 I nibbled at plans, then hopped to the keys,
Plugins whispering steps in tidy 2–5 minute pleas,
Reviews align, and milestones gleam,
A rabbit's small hop toward a saner stream. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: introducing the writing-plans plugin and CodeRabbit CLI for improving plan quality, which aligns with the PR's core objectives.
Linked Issues check ✅ Passed The PR implements all four phases of #3292: Phase 1 (writing-plans plugin via superpowers), Phase 2 (rules strengthening in coding-style.md), Phase 3 (CodeRabbit CLI integration), and Phase 4 (CodeRabbit CI maintenance).
Out of Scope Changes check ✅ Passed All changes directly support the plan quality improvement objective: configuration files, documentation, coding standards, and development setup align with the linked issue's requirements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch #3292
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.claude/rules/coding-style.md:
- Around line 31-34: Update the naming-conventions bullet for "New files" so it
reflects the actual project conventions instead of the aspirational ones: change
the custom route file example from snake_case (e.g., `user_profile.ts`) to plain
lowercase filenames (e.g., `auth.ts`, `kanban.ts`) and change the directory
convention example from kebab-case (e.g., `user-profile/`) to
underscore-prefixed directories (e.g., `_utils`, `_fixtures`, `_types`); keep
SvelteKit special file guidance as-is (`+page.svelte`, `+page.server.ts`,
`+server.ts`).

In @.claude/settings.json:
- Around line 5-10: The marketplace source under "extraKnownMarketplaces" ->
"superpowers-dev" currently points to a floating git URL; update the "source"
object (the entry with keys "source" and "url") to include a pinned Git ref by
adding a "ref" field set to the appropriate tag (e.g., "v1.0.0") so the "source"
object becomes stable and reproducible.

In @.coderabbit.yaml:
- Around line 44-47: The rules for the services path are self-contradictory:
update the instructions for the path 'src/**/services/**' to remove the circular
"No direct Prisma calls — delegate to service layer" line and replace it with a
clear rule such as "Service functions must return pure values or null; never
Response/json(). Service files may call Prisma directly — avoid database access
in controllers/handlers; keep Prisma usage encapsulated in services." Ensure the
change targets the existing instructions block for 'src/**/services/**' so
reviewers enforce services as the layer that may access Prisma while
controllers/handlers remain DB-free.
- Around line 11-22: The top-level exclusion '!prisma/migrations/**' prevents
the path_instructions for path 'prisma/**' (the migration rules) from ever
running; remove or modify that exclusion so migration files are not ignored
(e.g., delete the '!prisma/migrations/**' entry or replace it with a
non-excluding pattern) so the 'prisma/**' path_instructions (Migration files
must not be edited..., CHECK constraints documented in prisma/ERD.md) can be
enforced against prisma/migrations files.

In @.devcontainer/devcontainer.json:
- Line 28: Update the devcontainer postCreateCommand so the CodeRabbit installer
is pinned by exporting CODERABBIT_VERSION before invoking the installer; modify
the "postCreateCommand" string to set CODERABBIT_VERSION=<pinned-version> (e.g.,
v1.2.3) for the curl | sh step while preserving the existing chained commands
(npm install -g `@anthropic-ai/claude-code` and pnpm install) referenced in the
postCreateCommand entry in .devcontainer/devcontainer.json.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d6fbfacf-866b-4681-b2fc-e8ded64f362e

📥 Commits

Reviewing files that changed from the base of the PR and between eab9938 and 52a6227.

📒 Files selected for processing (9)
  • .claude/rules/coding-style.md
  • .claude/settings.json
  • .claude/skills/refactor-plan/instructions.md
  • .coderabbit.yaml
  • .devcontainer/devcontainer.json
  • AGENTS.md
  • CONTRIBUTING.md
  • docs/dev-notes/2026-03-20/plan-quality-improvement/plan.md
  • docs/guides/claude-code.md

Comment thread .claude/rules/coding-style.md Outdated
Comment thread .claude/settings.json
Comment thread .coderabbit.yaml Outdated
Comment thread .coderabbit.yaml Outdated
Comment thread .devcontainer/devcontainer.json
- Add dedicated path instruction for prisma/migrations/** to suppress
  style/formatting noise while still flagging security and data-loss bugs
- Remove migrations from global path_filters so the new path_instructions
  can apply
- Fix incorrect path_instructions note for services layer (Prisma calls
  belong in services, not a violation)
- Clarify underscore-prefix convention for helper dirs inside src/routes/
  (_utils/, _types/, _fixtures/, _components/) in coding-style.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator Author

@KATO-Hiro KATO-Hiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KATO-Hiro KATO-Hiro merged commit cd54f83 into staging Mar 20, 2026
3 checks passed
@KATO-Hiro KATO-Hiro deleted the #3292 branch March 20, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Tool]「superpowers」を導入してみましょう

1 participant